<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String ctx = request.getContextPath();
    request.setAttribute("ctx", ctx);
%>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap</title>
    <link rel="stylesheet" href="${ctx}/bootstrap/bootstrap.css">

</head>
<body>
<jsp:include page="/WEB-INF/pages/head.jsp"></jsp:include>
<div class="container" style="margin-top: 30px">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="form-inline">
                <form>
                    <label>品牌：</label>
                    <c:forEach items="${list}" var="var">
                        <c:if test="${var.id==bid}">
                            <img src="${var.pic}" class="img-thumbnail" style="width: 50px;height: 50px;margin-right: 20px" title="name" onclick="dl(${var.id})">
                        </c:if>
                        <c:if test="${var.id!=bid}">
                            <img src="${var.pic}" class="img-circle" style="width: 50px;height: 50px;margin-right: 20px" title="name" onclick="dl(${var.id})">
                        </c:if>
                    </c:forEach>
                    <%--<img src="${ctx}/summernote-0.8.18/2.jpg" class="img-circle" style="width: 50px;height: 50px;margin-right: 20px">--%>
                    <%--<img src="${ctx}/summernote-0.8.18/2.jpg" class="img-circle" style="width: 50px;height: 50px;margin-right: 20px">--%>
                    <%--<img src="${ctx}/summernote-0.8.18/2.jpg" class="img-thumbnail" style="width: 50px;height: 50px;margin-right: 20px">--%>
                </form>
            </div>
        </div>
        <div class="col-md-12 column">
            <div class="row">
                <div class="col-md-4">
                    <div class="thumbnail">
                        <div class="caption">
                            <c:forEach items="${pageInfo.list}" var="var">
                            <h3>
                               商品${var.name}
                            </h3>
                                <p>
                                    品牌${var.brand.name}
                                </p>
                            <p>
                                <img alt="300x200" src="${var.img}" style="width: 30px;height: 30px;" />
                            </p>
                            <p>
                                <button class="btn btn-primary" href="#">加入购物车</button>
                            </p>
                            </c:forEach>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctx}/bootstrap/jquery-1.9.1.min.js"></script>
<script src="${ctx}/bootstrap/bootstrap.js"></script>
<script>
    function dl(bid){
        location.href="${ctx}/shoplist.do?bid="+bid;
    }
</script>
</body>
</html>